package com.xqc.config;

import com.xqc.frame.ConfigTask;
import com.xqc.frame.TaskService;
import org.springframework.boot.context.event.ApplicationReadyEvent;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.event.EventListener;

import java.io.IOException;

@Configuration
//@ComponentScan("com.xqc")
public class XqcMvcConfig {

//    @EventListener({ApplicationReadyEvent.class})
    public void xqcMvcStratEvent(){
        try {
            Runtime runtime = Runtime.getRuntime();
            String url = "http://www.baidu.com";
            System.out.println("============");
            runtime.exec("cmd /c start " + url);
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

}
